Conversation
added 2 commits
April 24, 2026 11:18
`isMainEntry()`, pidfile helpers, and the cross-platform `spawn
process.execPath` pattern had diverged across apps/cli/src/commands/
{lifecycle,worker}.ts, apps/mcp-server/src/server.ts,
apps/worker/src/server.ts, and packages/hooks/src/auto-spawn.ts. The
0.2.0 release notes already flag this surface as the place Windows
EFTYPE and npm-symlink-shim regressions keep landing; duplicating the
fix four ways means the next regression gets missed in one.
Introduce `@colony/process` exporting `isMainEntry`, `isAlive`,
`readPidFile` / `writePidFile` / `removePidFile`, and
`spawnNodeScript` (wraps `spawn(process.execPath, [script, ...args],
{ detached, stdio: 'ignore' })`). All five call sites now share one
implementation.
No behavior change — the old regex pidfile path, the EFTYPE guard,
and the realpath-normalized `isMainEntry` all move verbatim.
Add the new `@colony/process` package to the repository layout and the "Architectural rules" dependency-order invariant in CLAUDE.md. `process` has no upstream workspace deps — only `node:` builtins — so it sits before `config` in the dep chain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated by gx branch finish (PR flow).